package com.runewbie.common.valid;

import javax.validation.Constraint;

import static java.lang.annotation.ElementType.*;

import javax.validation.Payload;
import java.lang.annotation.*;


/**
 * @author: li_jian
 * @version: 1.0
 * @date: 2020/5/2 17:45
 * @description： 自定义的校验注解
 */
@Documented
@Constraint(
        validatedBy = {ListValueConstraintValidator.class} // 关联 自定义的校验注解 和 自定义的校验器
)
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
public @interface ListValue {

    String message() default "{com.runewbie.common.valid.ListValue.message}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    int[] vals() default {};
}
